<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('logs', '\Rap2hpoutre\LaravelLogViewer\LogViewerController@index');
Route::any('/index', 'User\UserController@welcome');
Route::any('/', 'User\UserController@welcome');
Route::group(['prefix' => 'user'], function () {
    Route::any('login/index', 'User\UserController@login_index');
    Route::any('login/submit', 'User\UserController@login_submit');
    Route::any('reg', 'User\UserController@register');
    Route::any('reg/submit', 'User\UserController@register_submit');
    Route::any('home', 'User\UserController@home');
    Route::any('home/set', 'User\UserController@home_set');
});
Route::group(['prefix' => 'article'], function () {
    Route::any('details/{id}', 'Article\ArticleController@details');
    Route::any('add', 'Article\ArticleController@add_index');
    Route::any('add/submit', 'Article\ArticleController@add_submit');
});
Route::any('/search', 'Article\ArticleController@search');
Route::group(['prefix' => 'api'], function () {
    Route::any('', 'Api\TestController@index');
    Route::any('login', 'Api\TestController@login');
    Route::any('menu', 'Api\MenuController@index');
});